const  checkboxT = row => {
  if(row.eshopNumber){
    return 1
  }else {
    return 0
  }
}
export const columns = [
  {
    type: 'selection',
    minWidth: '50',
    label: '多选',
    selectable: checkboxT,
    disabled: true
  },
  {
    prop: 'orderNo',
    minWidth: '150',
    label: '商城订单号'
  },
  {
    prop: 'eshopNumber',
    minWidth: '150',
    label: '电商订单号'
  },
  {
    prop: 'orderName',
    minWidth: '150',
    label: '订单名称'
  },
  {
    prop: 'orderType',
    minWidth: '150',
    label: '订单类型'
	// formatter: orderType
	
  },
  {
    prop: 'consignee',
    minWidth: '100',
    label: '收货人'
  },
  {
    prop: 'phone',
    minWidth: '100',
    label: '联系方式'
  },
  {
    prop: 'completeAddress',
    minWidth: '400',
    label: '收货地址'
  },
  {
    prop: 'sumBudget',
    minWidth: '100',
    label: '订单金额'
  },
  {
    prop: 'eshopOrderPrice',
    minWidth: '100',
    label: '协议金额'
  },
  {
    prop: 'sumExcludeTaxPrice',
    minWidth: '100',
    label: '未税总价'
  },
  {
    prop: 'unitName',
    minWidth: '100',
    label: '单位名称'
  },
  {
    prop: 'purchaseName',
    minWidth: '100',
    label: '所属部门'
  },
  {
    prop: 'supplierName',
    minWidth: '100',
    label: '电商'
  },
  {
    prop: 'payment',
    minWidth: '100',
    label: '付款方式'
  },
  {
    prop: 'createTime',
    minWidth: '100',
    label: '下单时间'
  },
  {
    prop: 'orderStateName',
    minWidth: '100',
    label: '订单状态'
  },
  {
    prop: 'isDeliver',
    minWidth: '100',
    label: '物流状态'
  },
  {
    prop: 'receiptTypeName',
    minWidth: '100',
    label: '发票类型'
  },
  {
    prop: 'dutyParagraph',
    minWidth: '100',
    label: '发票税号'
  },
  {
    prop: 'registrationTelephone',
    minWidth: '200',
    label: '发票打印电话'
  },
  {
    prop: 'registeredAddress',
    minWidth: '200',
    label: '发票打印地址'
  },
  {
    prop: 'depositBank',
    minWidth: '100',
    label: '开户银行'
  },
  {
    prop: 'accountNumber',
    minWidth: '100',
    label: '银行账号'
  },
  {
    prop: 'remarks',
    minWidth: '300',
    label: '订单备注'
  },
  {
    fixed: 'right',
    minWidth: '150',
    label: '操作',
    slotName: 'operation'
  }
]

export const columns1 = [
  {
    prop: 'content',
    minWidth: '150',
    label: '操作信息'
  },
  {
    prop: 'operator',
    minWidth: '150',
    label: '操作人'
  },
  {
    prop: 'operate_time',
    minWidth: '150',
    label: '操作时间'
  }
]

export const columns2 = [
  {
    prop: 'goodsName',
    minWidth: '150',
    label: '商品名称'
  },
  {
    prop: 'categoryName',
    minWidth: '150',
    label: '品目'
  },
  {
    prop: 'sku',
    minWidth: '150',
    label: 'SKU'
  },
  {
    prop: 'brandName',
    minWidth: '150',
    label: '品牌'
  },
  {
    prop: 'typeNo',
    minWidth: '100',
    label: '型号'
  },
  {
    prop: 'buyNum',
    minWidth: '100',
    label: '数量'
  },
  {
    prop: 'unit',
    minWidth: '100',
    label: '计量单位'
  },
  {
    prop: 'excludeTaxPrice',
    minWidth: '100',
    label: '未税单价'
  },
  {
    prop: 'price',
    minWidth: '100',
    label: '含税单价'
  },
  {
    prop: 'sumExcludeTaxPrice',
    minWidth: '100',
    label: '未税总价'
  },
  {
    prop: 'budget',
    minWidth: '100',
    label: '含税总价'
  },
  {
    prop: 'supplierTaxRate',
    minWidth: '100',
    label: '税率'
  },
  {
    prop: 'afterSaleStatus',
    minWidth: '100',
    label: '退换货'
  },
  {
    minWidth: '100',
    label: '官网截图',
    slotName: 'priceOfficePicture'
  }
]




function orderType (row) {
  const item = row.orderType
  if (item === '1') {
    return '自营'
  } else if (item === '2') {
    return '撮合'
  } else{
    return ''
  }
}
